package com.qf.fmmall.utils;/*
 *徐韬
 *2022/1/23
 *12:40
 */

import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class md5Util {
    public static String md5(String password){
        try {
            MessageDigest md5 = MessageDigest.getInstance("md5");
            md5.update(password.getBytes());
            return new BigInteger(1,md5.digest()).toString(16);
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }

        return null;
    }
}
